const express = require('express');
const router = express.Router();

// 导入用户路由处理函数对应的模块
const {
  addAnswer,
  getAnswers,
  getAnswerById,
  deleteAnswerById,
  deleteAnswersByIds,
  updateAnswerById,
  isExist,
} = require('../handler/answer');

// 添加答卷
// router.post('/answer', addAnswer);
// 获取答卷
router.get('/answers/:paperid', getAnswers);
// 根据id获取单个答卷
// router.get('/answer/:id', getAnswerById);
// // 根据ID删除答卷
// router.delete('/answer/:id', deleteAnswerById);
// 根据多个ID批量删除答卷
// router.delete('/answers', deleteAnswersByIds);
// 根据ID编辑答卷信息
// router.put('/answer/:id', updateAnswerById);
// 判断字段值是否存在
// router.get('/answers/exist', isExist);

module.exports = router;
